home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / tcomp14.zip / TCOMP.DOC < prev    next >
Text File  |  1993-02-08  |  7KB  |  173 lines

  1. WHAT IS TCOMP?
  2.  
  3.     TCOMP exists because I had an unknown problem that was 
  4. causing a random file corruption that I couldn't figure out.  
  5. Data files and executable files were mysteriously being 
  6. corrupted in my PC and I had no way of telling if the 
  7. corruption was caused by a bad server, bad cabling, or my 
  8. local PC.  The only troubling shooting help I could get was 
  9. the standard "remove all of your TSRs and Device Drivers and 
  10. see if your local hardware is causing the problem".  
  11. Unfortunately, my problem was a DOS session in Windows being 
  12. hung in a networked environment as I compiled software.  I 
  13. couldn't very well repeat my problem in a simpler 
  14. environment since all of my development environment came 
  15. across the LAN and it was only in my complete environment 
  16. that the problem occurred.
  17.     TCOMP is a diagnostic program I wrote to try and get a 
  18. handle on the symptom.  It still doesn't tell you who is at 
  19. fault.  But it captures and saves the bad files as data 
  20. files instead of letting the Windows DOS emulator hang 
  21. accessing them as executable ones.  In my case it told me 
  22. which of our two file servers was exhibiting this strange 
  23. symptom.  It also let me analyze the corrupted files to see 
  24. what pattern they had.
  25.  
  26.  
  27. WHAT DOES TCOMP DO?
  28.  
  29.     TCOMP uses a starting LAN location and file 
  30. specification that you supply and then repeatably transfers 
  31. the files found to your local HDD, checking each transfer 
  32. for integrity with a simple checksum.  It recursively 
  33. searches for files to use starting from the LAN location you 
  34. specify.  It allows you to control the name suffix of the 
  35. files checked.  It allows you to transfer either standard or 
  36. random block sizes to test for LAN driver errors.
  37.     When a bad file is found (checksum of current transfer 
  38. doesn't match checksum of initial read or size is 
  39. different), it is saved to a local directory location that 
  40. you supply.  The entire bad file is saved along with some 
  41. other information about the failure: full path of bad file, 
  42. date/time stamp of original file, size of original file, 
  43. block size being read when file failed, and whether the file 
  44. failed with a bad checksum or with a size corruption.
  45.     Since I like feedback in my diagnostic programs, TCOMP 
  46. tells you lots of worthless info for each file it is 
  47. checking.  It counts 1K, 10K and 100K sizes as the reading 
  48. and checking phases run, so you will know how big the file 
  49. being read is.  It also tells you how many cumulative phases 
  50. (or passes through the selected file set) have run and how 
  51. many errors have been found.  The file count for the current 
  52. phase is displayed so you will know how far along the 
  53. checking is.  When a bad file is found the screen also 
  54. displays information about the error.  This information is 
  55. also saved to disk along with the bad file.  It also tells 
  56. you the block size the current file is being read with.
  57.  
  58.  
  59. HOW DOES TCOMP DO IT'S JOB?
  60.  
  61.     TCOMP first does a file count of the location and file 
  62. specification requested to make sure that it can handle the 
  63. number of files selected.  It also tells you what the total 
  64. transfer size will be so you can make sure it is larger than 
  65. any caches you might have active.  Then it does a phase that 
  66. searches each of those files to build the checksum list that 
  67. will be used for all subsequent reads.  From this point on 
  68. it loops for the number of phases requested-- or forever or 
  69. until you abort it-- reading the file set and comparing each 
  70. new checksum and size against the saved ones.
  71.  
  72.  
  73. HOW DO YOU CONTROL TCOMP?
  74.  
  75.     Typing "tcomp" from the command line will display it's 
  76. syntax, a short example and a brief explanation:
  77.  
  78. d:\code\tools\src>tcomp
  79. tcomp v1.4
  80. usage: tcomp spath dpath fspec lastphase [blksize]
  81. ex: tcomp z:\public d: *.exe 3 0
  82.        will do one full pass,
  83.        create or use d:\tdir for local storage,
  84.        and will randomize the file request sizes
  85. files selected will iterate 'lastphase'-2 times
  86. 'lastphase' of -1 runs forever
  87. 'blksize' must be <= 10000 (def)
  88. 'blksize' == 0 means make each file request random sized
  89.  
  90.     "spath" is the source path to use a the directory root 
  91. for the recursive file search.
  92.     "dpath" is the root to use for the temporary files read 
  93. for the file set and as a starting point to store any bad 
  94. files captured.  A directory called TDIR will always be 
  95. created beneath "dpath".  Any found bad files will 
  96. sequentially be put in subdirectories beneath 
  97. "dpath\TDIR\ERRxxx, where xxx is decimal number.
  98.     "fspec" is the simple file specification to qualify 
  99. files to check with.  Some examples are: *.c, *.*  and 
  100. *.exe.
  101.     "lastphase" is the phases of testing to run through.  
  102. Phase 0 signs on but doesn't do much useful.  Phase 1 does 
  103. the count of files to check and their size.  Phase 2 does 
  104. the count and size checks, and then does the first pass 
  105. through reading all of the files to build their checksums.  
  106. Phase 3 or greater controls testing for a finite number of 
  107. times.  The number of times the file set will be read and 
  108. compared will be "lastphase" minus 2; using "lastphase" = 10 
  109. reads the file set 8 times.  To make it run until you abort 
  110. it (control-c) use a "-1" for "lastphase".
  111.     "blksize" is optional and control the file request size 
  112. and (indirectly) the LAN packet block/deblock size.  The 
  113. default is 10000 bytes, and will be the fastest.  You can 
  114. set it to any other smaller size you want.  Setting 
  115. "blksize" to 0 causes each new file and each time through 
  116. the file set to choose a different file request size.  All 
  117. requests for the current file will be the same size.
  118.  
  119.     The output display for the current file status shows a 
  120. '.' for each 1K read, a '-' for each 10K read, and a '=' for 
  121. each 100K read.  These characters usually erase as they go 
  122. from one order of magnitude to another so you can tell the 
  123. rough file size by reading the ='s, -'s and .'s
  124.  
  125.  
  126. LIMITATIONS OF TCOMP:
  127.  
  128. 1) No more than 1000 files in a file set
  129. 2) Date/time stamp of saved bad file doesn't match original
  130. 3) Selected blocksize must be less than 10000 bytes
  131. 4) Always creates \TDIR to store bad files in
  132. 5) Saved subdirectory names stop at \ERR999
  133.  
  134.  
  135. OTHER STANDARD STUFF:
  136.  
  137. License
  138. -------
  139.  
  140. Copyright (C) Mark Bice 1993.
  141. All rights reserved.
  142.  
  143. Disclaimer and License
  144.  
  145. YOUR FIRST USE OF THIS SOFTWARE CONSTITUTES AGREEMENT TO THE 
  146. FOLLOWING PROVISIONS.  IF YOU DO NOT AGREE TO THEM, PLEASE 
  147. DO NOT USE THIS PROGRAM!
  148.  
  149. TCOMP is a copyrighted, proprietary program offered "as is", 
  150. without any warranty of merchantability or fitness for a 
  151. particular purpose, performance, or otherwise; all 
  152. warranties are expressly disclaimed.  By using TCOMP, you 
  153. agree that the author will not be liable for any use of (or 
  154. inability to use) or performance of this product, or for any 
  155. damages whatsoever.
  156.  
  157. This software is being distributed as a Freeware.  You may 
  158. use this program freely.  You may also copy and distribute 
  159. this program, as long as all the files are distributed 
  160. intact in a single archived file.  You may not sell this 
  161. program, and you may charge only nominal fee for 
  162. distribution not exceeding $5.00 a copy.
  163.  
  164. I would appreciate any bug reports, comments or suggestions. 
  165. Please contact me at:
  166.  
  167.     US Mail:    Mark Bice
  168.                 17619 N. 63rd Ave.
  169.                 Glendale, AZ 85308
  170.     CompuServe: 72641,607
  171.  
  172.  
  173.